package com.example.pojo.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 所学内容:聊天表
 *
 * @author ..
 * @Date 2023/10/26 18:52
 */
@Data
@AllArgsConstructor
@NoArgsConstructor

@Entity
@Table(name="chat")
public class Chat implements Serializable {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    //求职者Id
    private Integer jsId;

    //求职者姓名
    private String jsName;

    //求职者头像
    private String jsAvatar;

    //招聘者Id
    private Integer jrId;

    //招聘者姓名
    private String jrName;

    //招聘者头像
    private String jrAvatar;

    //最后消息产生时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date lastChatTime;

}
